import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import electron from 'vite-plugin-electron'

// https://vitejs.dev/config/
export default defineConfig({
    plugins: [vue(),
        electron({
            entry: './src-electron/main.js'
        })
    ],
    css: {
        preprocessorOptions: {
            scss: {}
        }
    },
    server: {
        port: 3000
    },
    chainWebpack(config) {
        config.module
            .rule('file-loader')
            .test(/\.(pdf|docx|doc|xlsx|mp4)$/)
            .use('file-loader?name=[path][name].[ext]')
            .loader('file-loader')
            .end();
    },
})
